home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1999 January - Disc 2 / Macworld (1999-01) (Disk 2).dmg / Mac OS 8.5 Updaters / RealPC⁄Soft Windows / SoftWindows / SoftWindows Upgrade Disk / INSIGNIA / DELFILES.BAT < prev    next >
Encoding:
DOS Batch File  |  1998-08-24  |  4.6 KB  |  148 lines

  1. rem [
  2. rem    Name:        u.delfiles.bat
  3. rem
  4. rem    Derived from:    (original)
  5. rem
  6. rem    Author:        Clive Standbridge
  7. rem
  8. rem    Created on:    Dec 1996
  9. rem
  10. rem    Sccs ID:    @(#)u.delfiles.bat    1.13 10/13/97
  11. rem
  12. rem    Coding Stds:    
  13. rem
  14. rem    Purpose:    Hard disk upgrader - delete files.
  15. rem
  16. rem    Parameters:    1    Action required. MUST be one of:
  17. rem                "list"    Delete and/or move files in internal
  18. rem                    list. The batch file processes a list
  19. rem                    of files, calling itself recursively
  20. rem                    to delete or move files as appropriate.
  21. rem                "del"    ONLY TO BE USED RECURSIVELY.
  22. rem                    Delete file(s) in parameter 2.
  23. rem                    Typically this would be used to remove
  24. rem                    obsolete Insignia-supplied files, where
  25. rem                    we are confident that they are obsolete.
  26. rem                "move"    ONLY TO BE USED RECURSIVELY.
  27. rem                    Move file(s) in parameter 2 to directory
  28. rem                    for obsolete files.
  29. rem                    If an obsolete copy already exists, the
  30. rem                    file is simply deleted.
  31. rem                "copy"    ONLY TO BE USED RECURSIVELY.
  32. rem                    Copy file(s) in parameter 2 to directory
  33. rem                    for obsolete files.
  34. rem                    If an obsolete copy already exists, the
  35. rem                    file is not copied.
  36. rem                Typically "move" and "copy" would be used to 
  37. rem                back up obsolete MS or third-party files, where
  38. rem                we wish to exercise some caution in removing
  39. rem                things completely from the user's disk.
  40. rem    Parameters for del action:
  41. rem            2    Full path of file(s) to be deleted/moved.
  42. rem    Parameters for move and copy actions:
  43. rem            2    Path to file to be deleted/moved/copied.
  44. rem            3    Name of file to be deleted/moved/copied.
  45. rem    Parameters for list action:
  46. rem             2       FSA directory for split Windows setup.
  47. rem                             = c:\windows for hard disk only setup.
  48. rem            3       Windows system directory.
  49. rem                             = c:\windows\system for hard disk only setup.
  50. rem            4       Intel OS; must be one of:
  51. rem                "dos", "win311", "wfw311", "win95", "win98".
  52. rem            5       Host OS ("mac", "unix", etc.)
  53. rem            6    New Intel OS flag; value 0(false) or 1(true)
  54. rem
  55. rem    Copyright 1997 Insignia Solutions PLC. All rights reserved.
  56. rem ]
  57.  
  58. goto %1
  59. rem goto end
  60.  
  61. :del
  62. if not exist %2 goto end
  63. echo deleting %2    >>c:\insignia\up.log
  64. del %2            >>c:\insignia\up.log
  65. goto end
  66.  
  67. :move
  68. :copy
  69. if not exist c:\insignia\obsolete\nul mkdir c:\insignia\obsolete    >>c:\insignia\up.log
  70. rem    Move/Copy the file to obsolete directory, unless a copy is already there.
  71. if not exist %2\%3 goto end
  72. if     exist     c:\insignia\obsolete\%3 goto end
  73. echo %1 %2\%3 to c:\insignia\obsolete    >>c:\insignia\up.log
  74. %1 /y   %2\%3    c:\insignia\obsolete    >>c:\insignia\up.log
  75. goto end
  76.  
  77. :list
  78. rem    Process list of files for removal.
  79.  
  80. rem    Obsolete networking setup files
  81. call %0 del  c:\insignia\netisnds.inf
  82. call %0 del  c:\insignia\netisodi.inf
  83. call %0 del  c:\windows\inf\netisnds.inf
  84. call %0 del  c:\windows\inf\netisodi.inf
  85.  
  86. rem    Potentially obsolete utilities may cause trouble;
  87. rem     the upgrader will create new ones when ready.
  88. call %0 del  c:\insignia\inspat95.exe
  89. call %0 del  c:\insignia\insreged.exe
  90.  
  91. rem    Obsolete log files
  92. call %0 del  c:\insignia.out
  93. call %0 del  c:\insignia\out
  94. call %0 del  c:\insignia\patch.out
  95.  
  96. rem    Mis-named batch file
  97. call %0 del  c:\insignia\use_cd.bat
  98.  
  99. rem    Obsolete drivers -  may cause problems
  100. call %0 del  c:\insignia\spcmswd.drv
  101. call %0 del  c:\insignia\swinsnd.drv
  102. call %0 del  %3\spcmswd.drv
  103. call %0 del  %3\swinsnd.drv
  104.  
  105. rem    Obsolete original binaries.
  106. rem    After Intel OS upgrade these are useless and potential trouble.
  107. if "%6" == "0" goto no_OS_change
  108. deltree /y  %3\original.sav        >>c:\insignia\up.log
  109. deltree /y  %3\vmm32\original.sav    >>c:\insignia\up.log
  110. :no_OS_change
  111.  
  112. rem    Obsolete 16-bit stuff and old shortcuts.
  113. itest strnicmp "%4" win9 4
  114. if errorlevel 1 goto not_win95
  115. call %0 del  c:\insignia\smrtcpy.exe
  116. call %0 del  c:\insignia\smrtcp32.exe
  117. call %0 del  c:\insignia\winidle.exe
  118. call %0 del  c:\insignia\wnidle32.exe
  119. call %0 del  %2\smrtcpy.exe
  120. call %0 del  %2\smrtcp32.exe
  121. call %0 del  %2\winidle.exe
  122. call %0 del  %2\wnidle32.exe
  123. call %0 del  c:\insignia\suspend.com
  124. call %0 del  c:\insignia\suspend.pif
  125. call %0 del  c:\windows\suspend.com
  126. call %0 del  c:\windows\pif\suspend.pif
  127.  
  128. call %0 del  %3\vidled.386
  129. rem    Possibly non-Insignia Winsock files
  130. call %0 copy %2 winsock.dll
  131. call %0 copy %3 wsock32.dll
  132. rem    winsock.dll in the SYSTEM directory must result from
  133. rem    installing Windows 95 over Windows 3.1 - just delete it.
  134. call %0 del  %3\winsock.dll
  135. goto all_win
  136.  
  137. :not_win95
  138. rem    Possibly non-Insignia Winsock files
  139. call %0 copy %3 winsock.dll
  140. call %0 copy %3 wsock32.dll
  141. goto all_win
  142.  
  143. :all_win
  144.  
  145. goto end
  146.  
  147. :end
  148.